home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / winsock / ircii2-6.zip / SCRIPTS\OLDPING < prev    next >
Text File  |  1994-12-28  |  2KB  |  41 lines

  1. # @(#)$Id: oldping,v 1.2 1994/09/03 14:38:22 mrg Stab $
  2. # PINGRELAY Script ------------------------------- [ Usage: /ping <nick> ] ---
  3. # Stores time of ping in message itself instead of in a single local variable.
  4. #
  5. # Original Idea: Robey POINTER     (Robey@IRC - robey@wright.sarc.msstate.edu)
  6. # Inspiration:   Klaus ZEUGE              (sojge@IRC - sojge@Minsk.DoCS.UU.SE)
  7. #                Nicolas PIOCH         (Nap@IRC - pioch@poly.polytechnique.fr)
  8. # Last revision: Ian FRECHETTE       (Daemon@IRC - frechett@spot.Colorado.EDU)
  9. # Collaboration: Peter HELLMONDS (snoopy@IRC - hellmond@phoenix.Princeton.EDU)
  10. # ----------------------------------------------------------------------------
  11. # CONVERTED for ircII2.2pre6
  12.  
  13. # Launch time is piggybacked on the PING RELAY request and sent out to the net.
  14. # (The echo *** PING ... line can be taken out, it's just for your information.)
  15.  
  16. # NOTICE NOTICE NOTICE   the ping alias is now called OPING
  17.  
  18. eval echo *** Notice:  The ping alias has been changed to OPING
  19. eval echo *** ircII2.2 and beyond have a built in PING command
  20.  
  21. ^alias OPING {
  22.     @ ping.tmp = 0
  23.     while ([$($ping.tmp)])
  24.     {
  25.         ctcp $($ping.tmp) ERRMSG PING RELAY $TIME()
  26.         echo *** PING to $($ping.tmp) launched \( $STIME($TIME()) \)
  27.         @ ping.tmp = ping.tmp + 1
  28.     }
  29. }
  30.  
  31. # When the PING RELAY comes back, print the time difference (now-launch time)
  32.  
  33. ^on ^ctcp_reply "* ERRMSG PING RELAY *" {
  34.         echo *** PONG Time to $0: ${time()-[$4]} seconds.
  35. }
  36.  
  37. # To be warned that you're being pinged, uncomment the following line:
  38. ^on ^ctcp "* ERRMSG PING RELAY *" echo *** PING Received a relay ping from $0
  39. # end of script: PINGRELAY
  40.  
  41.